<template>
  <div id="orderList">
    <div class="img_wrap" v-if="orders.length === 0">
      <img
        src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhbimg.huabanimg.com%2F3f2df4adcc6bc75bd898310be79898added2239a9888-8hXly7_fw658&refer=http%3A%2F%2Fhbimg.huabanimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1625374184&t=2dcbefd35b56cc7f9282e8890805cc31"
        alt="没有订单"
      />
    </div>
    <div v-else v-for="(item1, index1) in orders" :key="index1">
      <order-list-item
        v-for="(item2, index2) in item1"
        :key="index2"
        :item="item2"
      />
    </div>
  </div>
</template>

<script>
import OrderListItem from "./OrderListItem";
export default {
  name: "OrderList",
  components: {
    OrderListItem,
  },
  props: {
    orders: {
      type: Array,
      default() {
        return [];
      },
    },
  },
};
</script>

<style scoped>
.img_wrap img {
  width: 100%;
  height: calc(100vh - 49px - 44px);
}
</style>